<!-- Top Navbar-->
<#if headFlag?? && headFlag ='false'>
	<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <title>收货地址设置</title>
        <link rel="stylesheet" href="${staticpath}/phone/css/framework7.ios.min.css">
	    <link rel="stylesheet" href="${staticpath}/phone/css/framework7.ios.colors.min.css">
	    <link rel="stylesheet" href="${staticpath}/phone/css/font-awesome.min.css">
	    <!-- Path to your custom app styles-->
	    <link rel="stylesheet" href="${staticpath}/phone/css/app.css">
    </head>
    <body>
</#if>
<#if headFlag?? && headFlag ='true'>
<div class="navbar">
	<div class="navbar-inner">
		<div class="left">
			<a href="#" class="back link"> <i class="fa fa-angle-left"></i></a>
		</div>
		<div class="center sliding">收货地址管理</div>
	</div>
</div>
</#if>
</div>
 <div class="views">
    <div class="view view-main">
    <form data-search-list=".list-block-search" data-search-in=".item-title" class="searchbar searchbar-init" style="padding:0;display:none;" autocomplete="off">
     <div class="searchbar-input">
       <input type="search" class="j-search-input" placeholder="大家都在搜“高考”"><a href="#" class="searchbar-clear"></a>
     </div>
 </form>
<div class="pages">
	<!-- Page, data-page contains page name-->
	<input type="hidden" id="token" value="${(token)!}" / >
	<input type="hidden" id="basepath" value="${basepath!}"/>
    <input type="hidden" id="staticpath" value="${staticpath!}"/>
	<div data-page="address" class="page">
		<!-- Scrollable page content-->
		<div class="page-content">
		 <input type="hidden" id="basepath" value="${basepath!}"/>
        <input type="hidden" id="staticpath" value="${staticpath!}"/>
         <input type="hidden" id="token" value="${token!}" />
			<div class="administration-address choice-address">
				<#if addressList?? && addressList?size gt 0>
					<#list addressList as item>
						<div class="line-black" id="addressLineBlackDiv${item.id!}"></div>
						<div class="administration-line" id="addressDiv${item.id!}">
							<div class="other-line address-line">
								<div class="box">
									<div class="left-txt">
										<c> <span>${item.name!""}</span> <span>${item.mobile!""}</span></c>
										<p>${item.pcadetail!""}${item.address!""}</p>
									</div>
								</div>
							</div>
							<div class="administration-icon">
								<div class="box fn-clear">
									<div class="def-address">
										<#if item.isdefault?? && item.isdefault=="y">
											<div class="img" id="defaultdiv" onclick="setDefault(${item.id})" style="width:100%;height:32px;">
												<img style="width:16px;height:16px;" id="defaultimg${item.id}" src="${staticpath}/phone/images/selected_icon.png">
												<span id="span${item.id}" style="top:0;left:20px;color:red;">默认地址</span>
											</div>
										<#else>
											<div class="img" id="imgdiv${item.id}" onclick="setDefault(${item.id})" style="width:100%;height:32px;">
												<img style="width:16px;height:16px;" id="defaultimg${item.id}" src="${staticpath}/phone/images/default_icon.png">
												<span id="span${item.id}" style="top:0;left:20px;">设为默认</span>
											</div>
										</#if>
									</div>
									<div class="admin-edit-icon fn-clear" style="width:40%;">
										<div class="left" style="margin-right:4px;width:45%;">
											<a href="${basepath!}/phone/address/edit?id=${item.id}" class="a-block" style="height:30px;width:100%;">
												<div class="edit">
													<img src="${staticpath}/phone/images/edit_icon.png">
												</div> <span>编辑</span>
											</a>
										</div>
										<div class="right" style="width:45%;">
											<a href="javascript:deleteAddress(${item.id})" class="a-block" style="height:30px;width:100%;">
												<div class="detele">
													<img src="${staticpath}/phone/images/deletion_icon.png">
												</div>
												<span>删除</span>
											</a>
										</div>
									</div>
								</div>
							</div>
						</div>
					</#list>
				</#if>
				<div class="new-address">
					<div class="box">
						<a href="${basepath}/phone/address/add?token=${token!''}">添加新地址</a>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div>
</div>
<#if headFlag?? && headFlag ='false'>
 <script src="${staticpath}/phone/js/framework7.min.js"></script>
 <script src="${staticpath}/phone/js/jquery.min.js"></script>
 <script src="${staticpath}/phone/js/app.js"></script>
   </body>
</html>
</#if>